package com.ruoyi.shop.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.shop.service.IUserService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;

/**
 * 客服信息Controller
 * 
 * @author ruoyi
 * @date 2023-08-06
 */
@RestController
@RequestMapping("/customer")
public class UserController extends BaseController
{
    @Autowired
    private IUserService userService;

    /**
     * 获取客服信息详细信息
     */
    @RequiresPermissions("shop:shop:query")
    @GetMapping(value = "/{userName}")
    public AjaxResult getInfo(@PathVariable("userName") String userName)
    {
        return success(userService.selectUserByUserName(userName));
    }
}
